import panel, { panel_zindex } from '../../scripts/orc/panel/panel';
import UI_panel_hall from './package_hall/UI_panel_hall';
import package_hall_Binder from './package_hall/package_hall_Binder';
const { ccclass, property } = cc._decorator;
@ccclass
export default class panel_hall extends panel.panel {
    package_name: string = 'package_hall';
    panel_name: string = 'panel_hall';
    server_data: any = {};             //初始数据
    zindex: string = panel_zindex.panelLayer;
    isPersistPackage: boolean = false;
    _view: UI_panel_hall;
    _pview: fgui.GComponent;
    creatUI() {
        package_hall_Binder.bindAll();
        this._view = UI_panel_hall.createInstance();
        this._view.makeFullScreen();
        this._view.name = 'ui';
        this._view.node.name = 'ui';
        this._pview.addChild(this._view);
    }


    onLoad() {
        this.creatUI();
        this._view.m_btn_test.onClick(this.btn_handle.bind(this, 'test'));
        this._view.m_btn_begin.onClick(this.btn_handle.bind(this, 'begin'));
        this._view.m_btn_exit.onClick(this.btn_handle.bind(this, 'exit'));
    }

    btn_handle(btn_name: string) {
        console.log('btn', btn_name);

    }


}